package com.ayit.car.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

/**
 * 订单明细表
 * @TableName order_details
 */
@TableName(value ="order_details")
public class OrderDetails implements Serializable {
    /**
     * 订单明细ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 订单ID，关联订单表
     */
    private Long orderId;

    /**
     * 汽车名称
     */
    private String carName;

    /**
     * 图片URL
     */
    private String imageUrl;

    /**
     * 车型
     */
    private String model;

    /**
     * 车身颜色ID，关联颜色表
     */
    private Long exteriorColorId;

    /**
     * 内饰颜色ID，关联颜色表
     */
    private Long interiorColorId;

    /**
     * 配置信息，JSON格式
     */
    private String configurationInfo;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 订单明细ID
     */
    public Long getId() {
        return id;
    }

    /**
     * 订单明细ID
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 订单ID，关联订单表
     */
    public Long getOrderId() {
        return orderId;
    }

    /**
     * 订单ID，关联订单表
     */
    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    /**
     * 汽车名称
     */
    public String getCarName() {
        return carName;
    }

    /**
     * 汽车名称
     */
    public void setCarName(String carName) {
        this.carName = carName;
    }

    /**
     * 图片URL
     */
    public String getImageUrl() {
        return imageUrl;
    }

    /**
     * 图片URL
     */
    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    /**
     * 车型
     */
    public String getModel() {
        return model;
    }

    /**
     * 车型
     */
    public void setModel(String model) {
        this.model = model;
    }

    /**
     * 车身颜色ID，关联颜色表
     */
    public Long getExteriorColorId() {
        return exteriorColorId;
    }

    /**
     * 车身颜色ID，关联颜色表
     */
    public void setExteriorColorId(Long exteriorColorId) {
        this.exteriorColorId = exteriorColorId;
    }

    /**
     * 内饰颜色ID，关联颜色表
     */
    public Long getInteriorColorId() {
        return interiorColorId;
    }

    /**
     * 内饰颜色ID，关联颜色表
     */
    public void setInteriorColorId(Long interiorColorId) {
        this.interiorColorId = interiorColorId;
    }

    /**
     * 配置信息，JSON格式
     */
    public String getConfigurationInfo() {
        return configurationInfo;
    }

    /**
     * 配置信息，JSON格式
     */
    public void setConfigurationInfo(String configurationInfo) {
        this.configurationInfo = configurationInfo;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        OrderDetails other = (OrderDetails) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
            && (this.getCarName() == null ? other.getCarName() == null : this.getCarName().equals(other.getCarName()))
            && (this.getImageUrl() == null ? other.getImageUrl() == null : this.getImageUrl().equals(other.getImageUrl()))
            && (this.getModel() == null ? other.getModel() == null : this.getModel().equals(other.getModel()))
            && (this.getExteriorColorId() == null ? other.getExteriorColorId() == null : this.getExteriorColorId().equals(other.getExteriorColorId()))
            && (this.getInteriorColorId() == null ? other.getInteriorColorId() == null : this.getInteriorColorId().equals(other.getInteriorColorId()))
            && (this.getConfigurationInfo() == null ? other.getConfigurationInfo() == null : this.getConfigurationInfo().equals(other.getConfigurationInfo()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
        result = prime * result + ((getCarName() == null) ? 0 : getCarName().hashCode());
        result = prime * result + ((getImageUrl() == null) ? 0 : getImageUrl().hashCode());
        result = prime * result + ((getModel() == null) ? 0 : getModel().hashCode());
        result = prime * result + ((getExteriorColorId() == null) ? 0 : getExteriorColorId().hashCode());
        result = prime * result + ((getInteriorColorId() == null) ? 0 : getInteriorColorId().hashCode());
        result = prime * result + ((getConfigurationInfo() == null) ? 0 : getConfigurationInfo().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", orderId=").append(orderId);
        sb.append(", carName=").append(carName);
        sb.append(", imageUrl=").append(imageUrl);
        sb.append(", model=").append(model);
        sb.append(", exteriorColorId=").append(exteriorColorId);
        sb.append(", interiorColorId=").append(interiorColorId);
        sb.append(", configurationInfo=").append(configurationInfo);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}